#ifndef ZOR_SEMAPHORE_H
#define ZOR_SEMAPHORE_H

#include <visibility.h>
#include <stdint.h>
#include <semaphore.h>
#include "NoCopy.h"

class __EXPORT Semaphore : NoCopy {
public:
	Semaphore(uint32_t init = 0);
	~Semaphore();
	bool take(uint32_t timeout = ~0U);
	void give();
private:
	sem_t sem_;
};

#endif

